package fr.umlv.m2.uwp2011.web.client.professor;

import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.HasAlignment;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.VerticalPanel;

import fr.umlv.m2.uwp2011.web.client.Session;

public class ProfessorHomepage extends Composite {
  
  /**
   * The title of the page.
   */
  private final Label pageTitle;
  
  /**
   * Main panel.
   */
  private final VerticalPanel pagePanel;
  
	public ProfessorHomepage(Session session) {
	  /****************************** Widgets Creation ******************************/	  
	  this.pagePanel = new VerticalPanel();
		this.pageTitle = new Label(
		    "Bienvenue dans votre espace personnel Professeur " + 
		    session.getUser().getLogin()
		);
		
		/*************************** Widgets initialization ***************************/
		pageTitle.addStyleName("pageTitle");
		pagePanel.setWidth("100%");
		pagePanel.setHorizontalAlignment(HasAlignment.ALIGN_CENTER);

		/******************************** Widgets style *******************************/
		pagePanel.add(pageTitle);

		/******************************** Page building *******************************/
		initWidget(pagePanel);
	}
}
